/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.kj.pay.merchant.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.kj.pay.merchant.entity.MerchantDetails;
import com.jeesite.modules.kj.pay.merchant.dao.MerchantDetailsDao;
import com.jeesite.modules.file.utils.FileUploadUtils;

/**
 * merchant_detailsService
 * @author hzy
 * @version 2019-11-22
 */
@Service
@Transactional(readOnly=true)
public class MerchantDetailsService extends CrudService<MerchantDetailsDao, MerchantDetails> {
	
	/**
	 * 获取单条数据
	 * @param merchantDetails
	 * @return
	 */
	@Override
	public MerchantDetails get(MerchantDetails merchantDetails) {
		return super.get(merchantDetails);
	}
	
	/**
	 * 查询分页数据
	 * @param merchantDetails 查询条件
	 * @param merchantDetails.page 分页对象
	 * @return
	 */
	@Override
	public Page<MerchantDetails> findPage(MerchantDetails merchantDetails) {
		return super.findPage(merchantDetails);
	}
	
	/**
	 * 保存数据（插入或更新）
	 * @param merchantDetails
	 */
	@Override
	@Transactional(readOnly=false)
	public void save(MerchantDetails merchantDetails) {
		super.save(merchantDetails);
		// 保存上传附件
		FileUploadUtils.saveFileUpload(merchantDetails.getId(), "merchantDetails_file");
	}
	
	/**
	 * 更新状态
	 * @param merchantDetails
	 */
	@Override
	@Transactional(readOnly=false)
	public void updateStatus(MerchantDetails merchantDetails) {
		super.updateStatus(merchantDetails);
	}
	
	/**
	 * 删除数据
	 * @param merchantDetails
	 */
	@Override
	@Transactional(readOnly=false)
	public void delete(MerchantDetails merchantDetails) {
		super.delete(merchantDetails);
	}
	
}